
//清空对象
export function clearObject(obj) {
    if (!obj) return
    let keys = Object.keys(obj)
    for (let key of keys) {
        obj[key] = null
    }
    console.log(obj)
}

//将null转为undefined
export function null2undefined(obj) {
    if (!obj) return
    let keys = Object.keys(obj)
    for (let key of keys) {
        if( obj[key] === null) {
            obj[key] = undefined
        }
    }
}